/**
  ******************************************************************************
  * @file   System_config.cpp
  * @brief  Deploy resources,tasks and services in this file.
  ******************************************************************************
  * @note
  *  - Before running your Task you should first include your headers and init- 
  *    ialize used resources in "System_Resource_Init()". This function will be 
  *    called before tasks Start.
  *    
  *  - All tasks should be created in "System_Task_Init()", this function will
  *    be called in 'defaultTask()'.
  *
  ===============================================================================
                                    Task List
  ===============================================================================
  * <table>
  * <tr><th>Task Name     <th>Priority          <th>Frequency/Hz    <th>Stack/Byte
  * <tr><td>              <td>                  <td>                <td>    
  * </table>
  *
 */
/* Includes ------------------------------------------------------------------*/

#include "System_Config.h"
#include "Service_Communication.h"
#include "Service_Debug.h"
#include "Service_Module.h"
#include "Service_Operation.h"

/* Private variables ---------------------------------------------------------*/

/*Founctions------------------------------------------------------------------*/
/**
* @brief Load drivers ,modules, and data resources for tasks.
* @note  Edit this function to add Init-functions and configurations.
*/
void System_Resource_Init(void)
{
    /* Drivers Init ---------------------*/
    Timer_Init(&htim13, USE_HAL_DELAY);
    // HAL_TIM_PWM_Start(&htim2,TIM_CHANNEL_2);

    /* Other resources Init -------------*/


    /* Modules Init ---------------------*/
    // SEGGER_SYSVIEW_Conf();
    myPIDTimer::getMicroTick_regist(Get_SystemTimer);
    // Analyzer.getMicroTick_regist(Get_SystemTimer);
    // SysLog.getMilliTick_regist(HAL_GetTick);
    // SysLog.filter_conf(DEFAULT_TAG, LOG_LVL_ALL,Uart1_Transmit);
    // SysLog.filter_conf("Test Tag", LOG_LVL_ALL, Uart1_Transmit,&Filter_List[0]);
    // SysLog.global_conf(LOG_LVL_ALL, false);

    /* Service configurations -----------*/
  
}  

/**
* @brief Load and start User Tasks. 
* @note  Edit this function to add tasks into the activated tasks list.
*/
void System_Task_Init(void)
{ 
    /* Syetem Service init --------------*/
    Service_Debug_Init();
    Service_Communication_Init();
    /* Applications Init ----------------*/
    Service_Module_Init();
    Service_Operation_Init();
}

/************************ COPYRIGHT(C) USTC-ROBOWALKER **************************/
